//
//  HHImageMessageCellData.h
//  HHChatKit
//
//  Created by Henry on 2021/6/3.
//

#import "HHMessageCellData.h"

NS_ASSUME_NONNULL_BEGIN

/// 图像类别枚举
typedef NS_ENUM(NSInteger, HHImageType) {
    HHImageTypeThumb,     // 缩略图
    HHImageTypeLarge,     // 大图
    HHImageTypeOrigin,    // 原图
};

@interface HHImageItem : NSObject

@property (nonatomic, strong) NSString *uuid;
@property (nonatomic, strong) NSString *url;

@property (nonatomic) CGSize size;

@property (nonatomic) HHImageType type;

- (NSString *)getImageFileName;
- (NSString *)getImagePath:(NSString *)convsationId;

- (void)downloadPath:(NSString *)path progress:(HHDownloadProgress)progress succ:(HHSucc)succ fail:(HHFail)fail;

@end

@interface HHImageMessageCellData : HHMessageCellData

@property (nonatomic, strong) NSString *path;

@property (nonatomic, strong) UIImage *thumbImage;

@property (nonatomic, assign) NSUInteger thumbProgress;
@property (nonatomic, assign) NSUInteger uploadProgress;


@property (nonatomic, strong) NSMutableArray <HHImageItem *> *items;

- (void)loadImage;
- (void)loadImage:(HHImageType)type;

- (id)getThumbImage;
- (id)getOriginImage;
- (id)getPreviewImage;

@end

NS_ASSUME_NONNULL_END
